package com.hulk.dryad.common.util;

import cn.hutool.system.OsInfo;
import cn.hutool.system.SystemUtil;
import org.springframework.lang.Nullable;

/**
 * 系统工具类
 *
 * @author hulk
 */
public class OSUtil {



	/**
	 * <p>
	 * Gets a System property, defaulting to {@code null} if the property cannot be read.
	 * </p>
	 * <p>
	 * If a {@code SecurityException} is caught, the return value is {@code null} and a message is written to
	 * {@code System.err}.
	 * </p>
	 *
	 * @param property the system property name
	 * @return the system property value or {@code null} if a security problem occurs
	 */
	@Nullable
	private static String getSystemProperty(final String property) {
		try {
			return SystemUtil.get( property);
		} catch (final SecurityException ex) {
			return null;
		}
	}



	/**
	 * 工作默认为 mac 和 Windows,其他为服务器系统
	 * @return boolean
	 */
	public static boolean isLocalDev() {
		OsInfo os =	 SystemUtil.getOsInfo();
		if(os.isMac()|| os.isMacOsX() ||os.isWindows()){
			return true;
		}else {
			return false;
		}



	}
}
